package Test;

import java.util.Scanner;

/**
 * @author feng
 * @Date 2021/9/24 10:13
 *  加密程序。输出字符的下一个字母
 */
public class Test07 {
    public static void main(String[] args) {
        System.out.println("输入字符串: ");
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();

        for (int i = 0; i <s.length(); i++) {
            char c = s.charAt(i);
            if (c == 'z') {
                System.out.println("a");
            }
            if (c == 'Z'){
                System.out.println("A");
            }
            else{
                System.out.println("下一个字符是:" +(char)(c+1));

            }
        }



    }
}
